<?php 
    session_start();
	if (isset($_SESSION['uid'])) {
	    $uid = $_SESSION['uid'];
	}
	else {
	    if ($_SERVER["SCRIPT_NAME"] != "/testsmart/index.php") {
	        header("Location: login.php");
		}
	}
?>